<%@LANGUAGE="VBSCRIPT" CODEPAGE="1251"%>
<!--#include file="../../Connect/Connection.asp"-->
<%

Dim cnn
Dim rs
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open connStr&";Initial Catalog=meps"

Set rs=Server.CreateObject("ADODB.Recordset")
strSQL="SELECT al.id as alid,* FROM AutomatLogHistory al JOIN Automats a ON al.Automat=a.AutomatNumber WHERE al.ID = '"&Request.Form("txtID")&"'"
rs.Open  strSQL, cnn

IF NOT rs.eof THEN
	RegN=rs("RegN")
	Sec=rs("Sec")
END IF

rs.close
set rs=nothing
cnn.close
set cnn=nothing

response.redirect "spravka.asp?RegN=" & RegN & "&nomber=" & Sec & "&idpay=" & Request.Form("txtID")

%>